public class Teacher {
    private String teacherId;   // 教师编号
    private String name;        // 姓名
    private String gender;      // 性别
    private String title;       // 职称（扩展属性）
    private Course course;      // 所授课程

    // 构造方法
    public Teacher(String teacherId, String name, String gender, String title) {
        this.teacherId = teacherId;
        this.name = name;
        this.gender = gender;
        this.title = title;
    }

    // 教师开课方法（支持多参数传入）
    public Course openCourse(String courseId, String courseName, String location, String time, int credit) {
        this.course = new Course(courseId, courseName, location, time, credit, this);
        System.out.println(name + "（" + title + "）开设了课程《" + courseName + "》");
        return this.course;
    }

    // Getter 方法
    public String getName() { return name; }
    public Course getCourse() { return course; }
}